package com.chenl.provider.DEMOS.Quartz;

import lombok.extern.slf4j.Slf4j;
import org.quartz.impl.StdSchedulerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
import org.springframework.stereotype.Component;

//@Component
@Slf4j
public class QuartzController {


    @Scheduled(cron = "0/1 * * * * ?")
    public void testQuartz2() throws InterruptedException {
        log.info("定时任务执行了2:"+Thread.currentThread().getName());
//        Thread.sleep(3000);
    }

}
